package com.powernode.feign.sentinel;

import com.powernode.constant.BusinessEnum;
import com.powernode.domain.Member;
import com.powernode.feign.RemoteUserService;
import com.powernode.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 用户服务降级处理
 *
 * @author share
 */
@Component
@Slf4j
public class RemoteUserFallbackFactory implements RemoteUserService {

    @Override
    public Result<Member> getMemberInfo(String id) {
        log.error("远程调用失败：根据会员标识查询会员信息");
        return Result.fail(BusinessEnum.OPERATION_FAIL);
    }
}
